home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine CD 1995 / Archive Magazine CD 1995.iso / discs / prog_disc / volume_7 / issue_07 / elec_cad / Text < prev   
Encoding:
Text File  |  1994-02-24  |  21.2 KB  |  389 lines

  1. Electronic CAD (4) − Vector for PCB Design
  2. Richard Torrens
  3. I have been using DrawPlus for a long time now and it was so good that I 
  4. never upgraded to Vector. When I was considering an upgrade from 
  5. LinTrack, I purchased OakPCB because I had heard that it looked 
  6. promising. As you read in last month’s review, it does indeed look 
  7. interesting and it is fine for small circuits. However, I soon found 
  8. that there were severe limitations and I spent about 8 months trying to 
  9. give Oak help to overcome them. In the meanwhile, I have upgraded to 
  10. Vector and I regret not having done so before. Vector has some special 
  11. features which make it very good for PCB work. The latest version is 
  12. 1.10 and some of the features mentioned here may not be present on 
  13. earlier versions.
  14.  
  15. If, as a result of this article, you buy Vector (£85 +VAT), please 
  16. mention my name to 4Mation, so we can all assess the market for PCB CAD. 
  17. (The same applies if you buy it through Archive at £92. Ed.) If there is 
  18. sufficient demand, extra modifications are possible. In the meanwhile, 
  19. as 4Mation know nothing about PCB design, I have offered them free 
  20. technical support via Archive, so if you have problems please contact 
  21. me.
  22.  
  23. Vector was written, as was DrawPlus, by Jonathan Marten who is an 
  24. engineer in the aerospace industry. He started using Acorn’s original 
  25. Draw and found it lacking. So Jonathan started rewriting it. Eventually 
  26. he was satisfied and released the new program into PD as Draw1½. This 
  27. was gradually upgraded and became DrawPlus. Then Jonathan teamed up with 
  28. 4Mation, who put more ideas and improvements into the melting pot.
  29.  
  30. The important points are that the program was written for the 
  31. programmer’s own use. It is a ‘live’ program which still grows. It also 
  32. seems that JM is a very clear thinker as the program, Vector, is a very 
  33. major work which is very well thought out, useful for doing real things 
  34. and copes very well with a lot of tasks which JM never even considered. 
  35. I suspect that JM is never satisfied with his own work and, however good 
  36. it is, always seeks something better.
  37.  
  38. Jonathan has also written a utility to convert my old LinTrack files to 
  39. Vector and the resulting Vector display looks really good and prints out 
  40. excellently (within the limitations of the original LinTrack file). I 
  41. had initially thought that I would still use LinTrack and simply use 
  42. Vector for printing out. I’m not so sure now − it looks as if I’ll do 
  43. the design in Vector also.
  44.  
  45. Special features
  46. Vector’s special features are its layers, its rulers and position 
  47. readout, its ‘Overlay’ facility and its library. It also has facilities 
  48. for merging and splitting objects. These all combine to make the package 
  49. very versatile and powerful. The rest of this article is not intended as 
  50. a review of Vector, more as instructions on how to use these features, 
  51. with special reference to PCB design, since these features are not 
  52. covered very well in the manual. However, they are extremely powerful 
  53. and the description should give you some ideas for the more general use 
  54. of these facilities.
  55.  
  56. Layers − A drawfile already has ‘layers’ in that each object is drawn to 
  57. screen as it is read from the file so that they are placed in a pile 
  58. with the earliest object at the bottom of the pile and later ones on 
  59. top. You can move objects to the top or to the bottom of the pile in 
  60. Draw. You can, in Vector, also step the object one back or one forward 
  61. in the pile. This structure has nothing to do with the ‘Layers’ of 
  62. Vector and it is independent of Vector’s layers.
  63.  
  64. The layer structure which Vector uses gives each Draw object a separate 
  65. tag. There are 32 tags available and all items with the same tag number 
  66. are considered to be on one ‘layer’ (the word layer is something of a 
  67. misnomer, but I can’t think of a better word for the effect). The 
  68. benefit of this layer tag is clear as soon as you realise that, in 
  69. Vector, you can chose whether or not to display each layer and whether 
  70. or not you want any layer selectable. The concept is explained well in 
  71. the manual.
  72.  
  73. For a single-sided PCB, you can, for instance, keep all copper tracks on 
  74. one layer, copper pads on a second, drilling information on a third and 
  75. silk screen (component information) on a fourth. You will probably put 
  76. down pads first, then tracks. So make only the track layer selectable, 
  77. select all items and move them to the back. Immediately, the pads are 
  78. drawn correctly on top of the tracks and all the pad centre holes are 
  79. immediately visible.
  80.  
  81. Grouping works as in Draw but it also interacts with the layer 
  82. structure. When you group a selection of objects, a separate ‘group’ 
  83. object is formed and this ‘indexes’ the individual objects. It is rather 
  84. similar to forming a new directory on your disc and moving a group of 
  85. files into the new directory. The files themselves don’t change.
  86.  
  87. In a similar way, when you group a selection of objects, the layers of 
  88. those individual objects don’t alter and the layer structure is retained 
  89. ‘inside’ the new group. However, the group is created on the layer which 
  90. you were working on when you created it. The group will be displayed 
  91. with this layer, not with any of the layers of the objects within the 
  92. group, so the layer information appears to be lost. However, when you 
  93. ungroup the object, the individual objects within the group immediately 
  94. fall back to their original layers. You can, of course, group groups 
  95. together and the same thing applies. This is very similar in concept to 
  96. the ADFS file structure.
  97.  
  98. This structure can make layers very confusing if you don’t understand 
  99. it. For example, if you create a new drawing (which will only have a 
  100. single layer) and drop a grouped library item into it, the library item 
  101. may disappear completely if it was created on a layer which does not 
  102. exist in the new drawing. However, the grouped object will be there − 
  103. add layers so the object’s layer exists in the drawing and the object 
  104. will magically reappear.
  105.  
  106. Ruler − Draw lacks any position information except for the grid. Vector 
  107. has full position readout available on two rulers (which are scalable) 
  108. which makes accurate technical drawing very easy. The grid is locked to 
  109. the rulers and there is an option of setting the drawing origins 
  110. anywhere on the page. You can also digitally read the current cursor 
  111. position at any time. This is all exactly as requited for technical 
  112. drawing.
  113.  
  114. Overlay − Filling an open path has always seemed a little meaningless to 
  115. me. In Vector you can chose an ‘overlay’ instead of a fill. This is 
  116. specially useful in PCB work as, if you overlay a coloured path with 
  117. white, make the end caps round and then edit the path to zero length, 
  118. the result is a ‘donut’ of exactly the type we use for pads in PCB work 
  119. for pads. The result is exactly the same as a standard circle with a 
  120. defined line width, but is a lot easier to calculate (try getting a 
  121. circle of 0.1“ external diameter the normal way) and takes up a lot less 
  122. file space. Vector 1.10 is probably worth buying for this alone! The 
  123. overlay facility is new to Vector 1.10.
  124.  
  125. Library − Vector has a comprehensive library facility. Any Draw object, 
  126. whether a single object or a group of objects, may be saved to a 
  127. library. Libraries may be saved and loaded as required. A Library file 
  128. has a special filetype, so you can start Vector by clicking on a Library 
  129. file, and you can load a new library by clicking on it.
  130.  
  131. The library has a separate viewer window, so you can see the selected 
  132. library item before you use it.
  133.  
  134. Once you have designed a standard resistor, capacitor, etc, save it to 
  135. the library! You cannot really do PCB work without a good library 
  136. facility. In fact, the standard of items in your library very much 
  137. determines your overall style. I will end up with several PCB libraries 
  138. − one for single-sided boards (with 0.09“ diameter pads on copper layer 
  139. only) and a second for double-sided PTH boards (with 0.05” pads on both 
  140. sides).
  141.  
  142. There is, in the library menu, an option... ‘Reset layers’. If this is 
  143. ticked, the group and every object within it is has its layer reset to 
  144. the one you are working on when you load the library item. Be careful 
  145. with this because, if it is not as you expect, confusion results.
  146.  
  147. If you have the ‘Reset layers’ option unticked and the library item is 
  148. on a layer other than zero, then another effect can occur with a new 
  149. diagram. The new diagram will only have layer zero. If you pull in the 
  150. non-zero layer library item, it disappears. Now, if you add layers, the 
  151. library item will reappear when you add the layer it is on.
  152.  
  153. Beware also of changing the layer of a grouped object. This not only 
  154. moves the group but also resets every object within the group to be on 
  155. the new layer.
  156.  
  157. Jonathan Marten says that layers are one of the least used features in 
  158. the package and it was difficult for him to decide how layers should 
  159. work. I can well believe this but it does mean that, if you have any 
  160. better ideas, we may be able to get him to alter the program, so let me 
  161. know what you think.
  162.  
  163. Merge and split
  164. Draw contains the concept of ‘Move’ within a path but it can be very 
  165. difficult to implement moves in a sensible way. I require a move when I 
  166. am trying to draw an area of copper with one oo more odd shaped holes in 
  167. it. With DrawPlus, I found this difficult and with OakPCB it was nearly 
  168. impossible as OakPCB doesn’t even include a Move facility in a path.
  169.  
  170. With Vector it is easy: simply draw in the copper area as one filled 
  171. object and each hole as a separate unfilled object. When the area and 
  172. holes are exactly drawn to your satisfaction, select them all and apply 
  173. ‘Merge paths’. All the objects become one and (if the winding rule is 
  174. correct, which it is by default) the hole outlines appear correctly as 
  175. holes in the copper area. Later, if you wish to move any holes, pick the 
  176. object up and ‘Split to sub-paths’ to restore the copper area and the 
  177. hole outlines. Very simple!
  178.  
  179. Also, in laying down tracks, some are inevitably circuitous (no pun 
  180. intended) and I find that, when editing, I keep selecting these. If so, 
  181. I can select one and ‘Split to lines’. The object splits up to the 
  182. appropriate number of paths with no nodes. This can be very helpful.
  183.  
  184. Grid
  185. PCBs are normally laid out on 0.1“ grid, as this is the spacing between 
  186. pins of an IC, so it has become the standard grid for PCBs. Vector, of 
  187. course, has a 1” grid available. The basic grid can be subdivided into 
  188. up to 100 subdivisions so, for PCB work, you will use 10 divisions or, 
  189. more likely, 20 to give a basic 50 thou grid. For finer work, you can go 
  190. to a grid of 40 or even 80 or 100 divisions. If so chosen, the objects, 
  191. as they are created, will snap to this grid.
  192.  
  193. There is a slight problem with Library items. When a library object is 
  194. pasted into the diagram, how should it fit back onto the grid? Vector, 
  195. by default, will try to fit the edges of the bounding box to the grid, 
  196. but you can choose to lock the centre of the object to the grid. 
  197. However, for PCB work, what you really need is that the centres of the 
  198. pads be on your grid. Vector is not specific to PCBs so it has no 
  199. concept of a pad. It is therefore up to you to make sure that your 
  200. library objects are ‘symmetrical’ so that the pads end up where you want 
  201. them on the grid you chose. Many of my library objects include an 
  202. invisible path at the back, for just this reason.
  203.  
  204. PCB design
  205. The arrangement of layers that I use is:
  206. 0 Copper side tracks lines, round end caps, no fill/overlay.
  207. 1 Copper side areas filled paths
  208. 2 Copper side pads zero length lines, round end caps, overlaid
  209. 3 Top side tracks as layer 1
  210. 4 Top side areas as layer 2
  211. 5 Top side pads as layer 3
  212. 6 Drilling marks for hole sizes, board outline, etc, comments to 
  213. photographers/board producers
  214. 7 Silk screen
  215. 8 Outlines: board outlines and cropping which may require printing out 
  216. with top and bottom side artwork
  217. 9 Grouped objects: Library items which may contain pads, silk screen, 
  218. etc
  219. 10 Work in progress
  220.  
  221. The reason for keeping topside and copper side information separate is 
  222. obvious. However, why three layers for copper side? Firstly, I keep pads 
  223. on their own layer so that they may be depth-sorted to lie on top of 
  224. tracks so that the centre holes are correctly printed as explained 
  225. above.
  226.  
  227. The reason for separating tracks from areas is to do with printing. To 
  228. get a good, black image, the printed object must be black − yet I need 
  229. colours on screen to see what I am doing. I cannot pick tracks and areas 
  230. up together as tracks are thick, unfilled lines which only require a 
  231. line colour change whilst areas require a line and a fill colour to be 
  232. specified. If I select a fill colour for tracks, I end up with filled 
  233. lines which is not what I require. Separating like this, means that I 
  234. can change the line colour only on layer 0 and line and fill colour on 
  235. layer 1.
  236.  
  237. Grouped objects are library items, containing all relevant draw objects, 
  238. each with their correct layer information. This makes editing the layout 
  239. relatively simple. All the grouping is done on layer 9. When the board 
  240. is completed to my satisfaction, I lock the source file, so I won’t save 
  241. over it. Then I simply make all layers unselectable except layer 9. I 
  242. then ‘Select all’ to pick up everything on layer 9 and ‘ungroup’. All 
  243. individual draw objects fall back to their correct layers. I then do a 
  244. ‘comb sort’ selecting layer 1 only, move it to the top, layer 2 move to 
  245. top and so on through to layer 9. Then I change colours as just 
  246. discussed and do my printout.
  247.  
  248. Thus, a typical library item (e.g. a resistor) will have two copperside 
  249. pads (layer 3), two topside pads (layer 6), two pads on layer 7 (to 
  250. indicate the hole size) and an outline (layer 8). These objects will all 
  251. be grouped together on layer 9. If the resistor has a value or number 
  252. attached to it, this is added to layer 8 after the library object is 
  253. placed. The library object and value are then picked up and grouped 
  254. again on layer 9. If a value change is later required, I can go to layer 
  255. 9 (grouped), make only it and layer 7 (silk screen) selectable, pick up 
  256. the object, ungroup it, alter the value then regroup it. Before 
  257. printing, two ‘ungroup’ operations will disintegrate the drawing, ready 
  258. for colour changes. If the library is PTH, then the same pads will do 
  259. for top and bottom, so only one pad layer is needed.
  260.  
  261. With the layer structure, I can also do my editing on a new layer, so I 
  262. can see the Before and After effect. First create three new layers (say 
  263. 10, 11 and 12). Next pick up everything you want to edit, move to the 
  264. new layer 11 and group them. Make layer 11 invisible and unselectable − 
  265. the group disappears. Move to layer 10, make everything except layer 11 
  266. (the ‘before’ group) selectable. Select all and group it to protect it 
  267. from change. Now move back to layer 11, select all and copy it. Move the 
  268. copy back to exactly overlay the original and ungroup it. Make layer 11 
  269. (the ‘before’ group) invisible.
  270.  
  271. You now have a file with only certain objects editable: alter this as 
  272. you want. Then make the ‘unchanged’ group’s layer unselectable, move to 
  273. layer 12, select all (which will be all the edited objects) and group 
  274. then.
  275.  
  276. You can now switch between ‘before’ and ‘after’ to check your change by 
  277. making layer 11 the current layer and invisible. Tick the icon 
  278. ‘Automatic sel/vis switch’ so that when you step between layer 11 and 
  279. 12, you can see the changes.
  280.  
  281. The use of layers and grouping in this way make for some exciting 
  282. possibilities as well as some potential for confusion. How about a 
  283. modification file, where a complete modification history is present and 
  284. can be viewed by stepping through the layers? Or if you want to alter 
  285. your diagram, you can group the parts you wish to alter on a spare layer 
  286. and turn this layer off; the grouped bits vanish from view. Now group 
  287. the rest of the diagram on another spare layer but don’t turn them off, 
  288. just make it unselectable. You can now make the changes and group them 
  289. on a new layer. By turning the appropriate layers on and off you can see 
  290. before and after views.
  291.  
  292. Some examples
  293. One of the components I use is a relay. Its footprint is shown in the 
  294. diagram. This has two rectangular slots in the top left corner which are 
  295. 2.6mm × 1.1mm. The other pins of the relay require that it be drawn on a 
  296. 1/20mm grid − this was no problem with Vector. Now this relay is a 
  297. single pole ‘make’ relay − the top left contact is to be left 
  298. unconnected. The second item is the copper track that I have in the 
  299. library file for the relay, scaled ×2 so you can see it. This consists 
  300. of two identical objects. Each object is a pair of rectangles with a 
  301. move between them, so the inside is not filled, to represent the 
  302. required slot. The second item shows the effect of applying this to the 
  303. two objects − I have also applied ‘no fill’ so you can see them. In the 
  304. third item, I have drawn a filled rectangle over the two original items 
  305. to represent the copper area to which I am connecting. I have ‘split to 
  306. subpaths’ the two objects, and deleted the outer box of the right hand 
  307. one. Then I selected all four items and applied another ‘merge paths’. 
  308. This makes them all into one item with moves where appropriate, so on 
  309. the right I get a rectangular slot where the board has to be milled out 
  310. and on the left I get a rectangular copper area with a rectangular clear 
  311. area around it. When the board is milled out at the copper rectangle the 
  312. relay contact will not connect, which is exactly what I require.
  313.  
  314. This is very simple in Vector and, so far as I know, is either 
  315. impossible or very difficult with other dedicated PCB design packages. 
  316. In LinTrack, I would have had to use individual sections of line to do 
  317. the job − easy if not very elegant. On OakPCB it was impossible to do 
  318. accurately − Oak doesn’t allow for moves at all. CADMust has no 
  319. facilities for non-round holes, I’m told, and although Silicon Vision 
  320. won’t let me see an up-to-date copy of ArcPCB, the early version I do 
  321. have cannot cope either.
  322.  
  323. The library file has all the elements of the relay, except for the 
  324. copper rectangles, grouped on layer 9. This group is then grouped again 
  325. with the copper rectangles onto layer 9. Thus, when I have drawn the 
  326. copper area into which it will fit, I can ungroup the relay, dropping 
  327. the copper areas back onto layer 1, do the splitting and merging and get 
  328. the required result. If I later decide to move the relay I can again 
  329. split, delete the relay and replace it from the library with a new relay 
  330. in the right place. Ungrouping will drop the copper areas in the right 
  331. place again with no fuss.
  332.  
  333. Paul’s not sure how it will come out in the printing, but the following 
  334. diagram shows a PCB layout I have done with Vector.
  335.  
  336. Editing
  337. It can be very difficult to get a PCB layout correct first time unless 
  338. it is simple. It is probably easier to get a digital circuit right as 
  339. interconnections between chips are well defined and spacing between 
  340. chips can be relatively easily standardised, but with analogue circuits 
  341. (which use a lot of discrete components) the first version of the 
  342. circuit is not often correct and, during development, a lot of editing 
  343. is necessary. Vector, it must be said, is not at its best during 
  344. editing. However, editing is a difficult area for most PCB layout 
  345. packages and, in comparison with other packages, Vector actually does 
  346. very well indeed. More about editing next month.
  347.  
  348. Summary
  349. Vector gives me, in a single package, a circuit design package, a PCB 
  350. layout package, a technical drawing package and a general drawing 
  351. package. I would love to find a dedicated PCB program which does better 
  352. but I can’t, although I’m still looking. In the meanwhile, I enjoy using 
  353. Vector. Using Vector for everything also simplifies my learning curve. 
  354. However, be warned: Vector has no design rules to help you with PCB 
  355. work: Vector will only do what you tell it. It won’t fight you but it is 
  356. so versatile that you may easily confuse yourself. It can do just about 
  357. anything you want − so it can be very easy to make it do something you 
  358. don’t want, especially with the use of layers and grouping, so organise 
  359. your thoughts.
  360.  
  361. I have several future articles planned: next month I shall look at 
  362. LinTrack and the LinTrack to Vector converter Jonathan Marten has 
  363. written.
  364.  
  365. How about PipeDream for parts listing, stock control, purchasing, letter 
  366. answering, DTP and for general business use? I also want to get into 
  367. SBase and how to use it for stock control. Circuit Analysis programs are 
  368. on my list (a couple were reviewed last month) and I may also cover 
  369. ArcFax and Prophet − incidentally Quentin Paine of Apricote Studios is 
  370. working on a major update of this which I await with interest.
  371.  
  372. RiscCAD
  373. Then there’s RiscCAD from Davyn Software. The programmer, David Buck, 
  374. wants to write a PCB design package and I am in close contact with him. 
  375. Now is your chance to get in on the ground floor and tell the programmer 
  376. exactly what you do or do not want in a program. All suggestions to me 
  377. please. We could get the program we all want if we act quickly.
  378.  
  379. Fastrax
  380. There is also Fastrax from Techsoft. A pre-release copy of this arrived 
  381. on my desk by this afternoon’s post. It looks very promising indeed. 
  382. There is, as yet, no manual but the program seems pretty much self-
  383. explanatory. I have had a long chat with the programmer and − would you 
  384. believe it − he used to work for Linear Graphics so, in effect, the 
  385. program is taking over the legacy of LinTrack. Maybe that’s why I find 
  386. it so interesting − more on this is sure to follow.
  387.  
  388.  
  389.